<!--ZP: DESDE UNA VENANA MODAL-->
<div class="span3" align="right" >
        <!-- Button to trigger modal -->
        <a data-toggle="modal" href="#addStory" class="btn btn-small btn-inverse <?php if (isset($from)){ echo 'btn-block pull-right';} ?>" role="button"  >
            <i class="icon-plus-sign icon-white"></i> Nueva
            <?php if (isset($from)){
                 echo 'User Story';
                 }
             ?>
        </a>
        <!-- Modal -->

</div>
<div id="addStory" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
                    
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel">Nueva User Story</h3>
    </div>
    <div class="modal-body">
        <?php
        if (!isset($from)) $from=1;

        echo $this->Form->create('Story', array('url' => '../stories/add/'.$project['Project']['id'].'/'.$from, 'class'=>'form-horizontal'));
        ?> 
        <fieldset> 

        <?php 
            $optionsLabel = array('class' => 'control-label','text'=>'Resumen');
            $options = array('div' => 'control-group','label'=>$optionsLabel,'class'=>'controls');
            echo $this->Form->input('summary',$options);

            $optionsLabel = array('class' => 'control-label','text'=>'Detalle');
            $options = array('div' => 'control-group','label'=>$optionsLabel,'class'=>'controls','rows' => '3');
            echo $this->Form->input('detail',$options);

            $arrOptions=array();
                    for ($i=0;$i<$project['Project']['sprints'];$i++){
                        $idS=$i;
                        $nameS='Sprint '.($idS+1);
                        $arrOptions[$idS]=$nameS;
                
            }
            ?>
            <?php 
            $optionsLabelS = array('class' => 'control-label','text'=>'Sprint');
            $attributesS = array('div' => 'control-group','label'=>$optionsLabelS,'class'=>'controls');
            
            echo $this->Form->input('sprint', array(
                'options' => $arrOptions,'value' => 'Sprint 1','div' => 'control-group','label'=>$optionsLabelS,'class'=>'controls' ));
            ?>
                
            <?php
            
//            $options = array('0' => '?', '1' => '1', '2' => '2', '3' => '3', '5' => '5', '8' => '8', '13' => '13', '20' => '20', '40' => '40', '100' => '100' , '1000' => 'Infinito');
//            $attributes = array('value' => '?','legend'=>false,'separator' => '</td><td>'); 
            ?>
<!--            <div class="control-group">
            <label class="control-label">Estimación</label>    
            <table style="margin-left: 20px; display: inline-block;  margin-bottom: 0; width: 300px;">
                <tr>
                    <td>
                    <?php  echo $this->Form->radio('points', $options, $attributes);?> 
                    </td>
                </tr>
            </table>
            </div>-->

        </fieldset>

    </div>
    <div class="modal-footer">
        <div class="row-fluid " >
            <div class="span12">
                <div class="span8">                      
                </div>
                <div class="span2">
                    <button class="btn" data-dismiss="modal">Cancelar</button>
                </div>
                <div class="span2">
                    <?php
                    $optionsBtn = array('label' => 'Guardar','class' => 'btn');
                   
                    echo $this->Form->end($optionsBtn);
                    
                    ?>
                    
                </div>
            </div>
        </div>
    </div>
</div>